﻿//-----------------------------------------------------------------------
// <copyright file="ITupleRelationIndex.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the ITupleRelationIndex interface.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Engine.Tuples
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    /// Represents a tuple relation index.
    /// </summary>
    public interface ITupleRelationIndex : IComparable
    {
        /// <summary>
        /// Filters A tuple list.  Compares the tuple list to a key-value pair from
        /// a tuple view.
        /// </summary>
        /// <typeparam name="T">The tuple type that is indexed.</typeparam>
        /// <param name="tupleLinkedList">A tuple linked list.</param>
        /// <param name="tupleViewEntry">A key-value pair entry from a tuple view.</param>
        /// <returns>Indicates if the tuple list matches the key-value pair.</returns>
        bool Filter<T>(TupleLinkedList tupleLinkedList, KeyValuePair<T, TupleLinkedList> tupleViewEntry);
    }
}
